/**
 * @author jprieur
 * @created 06/06/07
 */
package utils;

import javax.swing.filechooser.*;
import java.io.File;

public class SimmobilFileFilter extends FileFilter
{
    private String ext;
    
    public SimmobilFileFilter(String ext)
    {
	this.ext = ext;
    }
    
    public boolean accept(File file)
    {
	return file.isDirectory() || file.getName().endsWith(ext);
    }
    
    public String getDescription()
    {
	return String.format("Simmobil simulation file (*.%s)",ext);
    }

    public String getExtension()
    {
	return ext;
    }
}
